<template>
    <van-tabs
        v-model:active="activeName"
        class="checkin-container"
        @click-tab="onClickTab">
        <van-tab
            :title="$st('wp_Check_in')"
            name="checkin">
            <keep-alive>
                <checkin v-if="activeName==='checkin'"/>
            </keep-alive>
        </van-tab>
        <van-tab
            :title="$st('wp_Check-in_record')"
            name="clockinrecord">
            <keep-alive>
                <checkin-record v-if="activeName==='clockinrecord'"/>
            </keep-alive>
        </van-tab>
    </van-tabs>

</template>

<script>
import Checkin from './Checkin.vue';
import CheckinRecord from './CheckinRecord.vue';
import { ref } from 'vue';
import { selfI18n } from '@/i18n';
export default {
    components: { Checkin, CheckinRecord },
    setup () {
        const activeName = ref('checkin');
        const $st = selfI18n;
        const onClickTab = ({ title }) => {
            if (title === $st('wp_Check-in_record')) {
                // console.log();
            }
        };
        return { activeName, onClickTab };
    }
};
</script>

<style scoped>
.checkin-container{

}
</style>
